package com.java.jetpackdemo

import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.java.jetpackdemo.room.RoomActivity
import com.java.jetpackdemo.databinding.MainActivity
import com.java.jetpackdemo.lifecycles.LifeCyclesActivity
import com.java.jetpackdemo.navigation.navigation_one.NavigationActivity
import com.java.jetpackdemo.savestate.SaveStateActivity
import kotlinx.android.synthetic.main.activity_welcome.*

class WelcomeActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_welcome)

        btn_databinding.setOnClickListener {
            startActivity(Intent(this, MainActivity::class.java))
        }

        btn_savestate.setOnClickListener {
            startActivity(Intent(this, SaveStateActivity::class.java))
        }

        btn_navigation.setOnClickListener {
            startActivity(Intent(this, NavigationActivity::class.java))
        }

        btn_lifecycle.setOnClickListener {
            startActivity(Intent(this, LifeCyclesActivity::class.java))
        }

        btn_room.setOnClickListener {
            startActivity(Intent(this,RoomActivity::class.java))
        }
    }
}
